package com.service.imp;

import com.mapper.Yuyue_lfyMapper;
import com.pojo.Yuyue_lfy;
import com.service.Yuyue_lfyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class Yuyue_lfyServiceImpl implements Yuyue_lfyService {
    @Autowired
    private Yuyue_lfyMapper yMapper;
    @Override
    public int insertInfo(Date yuyueTime, Integer yuyueUid, String yuyueType, String yuyueContent) {
        return yMapper.insertInfo(yuyueTime,yuyueUid,yuyueType,yuyueContent);
    }

    @Override
    public List<Yuyue_lfy> selectAll() {
        return yMapper.selectAll();
    }

    @Override
    public Integer delete(Integer yuyueId) {
        return yMapper.delete(yuyueId);
    }

    @Override
    public List<Yuyue_lfy> searchTime(Date yuyueTime, String username) {
        return yMapper.searchTime(yuyueTime,username);
    }

    @Override
    public int updateInfo(Yuyue_lfy yuyue_lfy) {
        return yMapper.updateInfo(yuyue_lfy.getYuyueTime(),yuyue_lfy.getYuyueDel(),yuyue_lfy.getYuyueType(),
                yuyue_lfy.getYuyueContent(), yuyue_lfy.getYuyueId());
    }
}
